package com.syedu.day08;

/**
 * @Description 狗的子类
 * @createTime 2022/3/17 9:21
 * @author Administrator
 */
public class Dog extends Animal {
    //子类的特有属性
    private double loy;//忠诚度

    //子类的构造
    public Dog() {

    }

    public Dog(String type, String color, double loy) {
        super(type, color);
        this.loy = loy;
    }

    public double getLoy() {
        return loy;
    }

    public void setLoy(double loy) {
        this.loy = loy;
    }

    @Override
    public void eat() {

    }

    @Override
    public void sleep() {

    }

    //子类的特有方法
    public void watchDoor() {
        System.out.println("狗在看门...");
    }
}
